Modify the query assignment policy for the query partition identified by
{partition-number}
in the database identified by {id|name}
.
URL Parameters | |
---|---|
format | The format of the requested data. Can be
html , json or xml (default). If present, the
format parameter overrides the Accept header. |
Upon success, MarkLogic server returns status code 200 (OK). If the payload is malformed, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-admin
role, or the following
privilege: http://marklogic.com/xdmp/privileges/manage-admin
availability
updates-allowed
query-exclusion
curl -X POST --anyauth -u admin:admin -H "Content-Type:application/xml" \ -d '<partition-query-properties xmlns="http://marklogic.com/manage/partition-query/properties"> <partition-number>2</partition-number> <query> <cts:or-query xmlns:cts="http://marklogic.com/cts"> <cts:word-query> <cts:text xml:lang="en">Project Manager</cts:text> </cts:word-query> <cts:word-query> <cts:text xml:lang="en">Project Manager</cts:text> </cts:word-query> </cts:or-query> </query> </partition-query-properties>' \ http://gordon-1:8002/manage/v2/databases/Schemas/partition-queries/2/properties
curl -X POST --anyauth --user admin:admin -H "Content-type: application/json" \ -d '{ "partition-number": 2, "query": { "orQuery": { "queries": [ { "wordQuery": { "text": [ "Project Manager" ], "options": [ "lang=en" ] } }, { "wordQuery": { "text": [ "Project Manager" ], "options": [ "lang=en" ] } } ] } } }' \ http://gordon-1:8002/manage/v2/databases/Schemas/partition-queries/2/properties
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.